package com.pixiv.service.Impl;

import com.pixiv.DAO.NoticeMapping;
import com.pixiv.Entity.Notice;
import com.pixiv.service.NoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class NoticeServiceImpl implements NoticeService {

    @Autowired
    private NoticeMapping noticeMapping;

    public List<Notice> getNotices(String noticeid, String noticeCaption){
        return noticeMapping.getNotices(noticeid,noticeCaption);
    }

    @Override
    public void insertNotice(Notice n) {
        noticeMapping.insertNotice(n);
    }

    @Override
    public Notice getNotice(String uuid) {
        return noticeMapping.getNotice(uuid);
    }

    @Override
    public void delNotice(String uuid) {
        noticeMapping.deleteNotice(uuid);
    }
}
